import { InjectionToken } from "tsyringe";
import { ACCOUNT_NAME, APP_TITLE, CLOUD_HOST, CLOUD_PORT, DEVICE_NAME, DEVICE_UUID, STATUS_BAR_COLOR, TOOLBAR_BG_COLOR } from "../tokens/const";
import { generateRandomString } from "./generateRandomString";
import { CURRENT_ACTIVITY, CURRENT_PACKAGE, CURRENT_TASK, PUSH_TOKEN, SHOW_CONSOLE, getCurrentActivity, getCurrentPackage } from "../tokens";

export function getTokenDefault(key: InjectionToken<any>) {
    switch (key) {
        case CURRENT_TASK:
            return `default`;
        case DEVICE_UUID:
            return generateRandomString(16)
        case DEVICE_NAME:
        case ACCOUNT_NAME:
            return ``
        case STATUS_BAR_COLOR:
        case TOOLBAR_BG_COLOR:
            return `#2980b9`
        case APP_TITLE:
            return `老哥助手1.0`
        case CURRENT_ACTIVITY:
            return getCurrentActivity()
        case CURRENT_PACKAGE:
            return getCurrentPackage()
        case SHOW_CONSOLE:
            return false;
        case PUSH_TOKEN:
            return `4727c34ae01442999246daf57ee9d3a6`
        default:
            return undefined;
    }
}